/*
 ============================================================================
 Name        : actions.h
 Author      : Victor Gaspar
 Version     :
 Copyright   :
 Description : Predefined robot ACTIONS for sending to the USBI2C port
 ============================================================================
 */

#ifndef ACTIONS_H_
#define ACTIONS_H_

typedef struct
{
    const char *action;
    const char * const *message;
    const int num_messages;
} lookuptab;

// Predefined ACTIONs for two MD03 boards controlled by one USB-I2C interface
static const lookuptab tab[] =
{
    {"FORWARD", (const char * const []) {"0xAA;0xA0;0x55;0xB2;0x02;0x01;0x77", "0xAA;0xA0;0x55;0xB0;0x02;0x01;0x77",
    								"0xAA;0xA0;0x55;0xB2;0x03;0x01;0x88", "0xAA;0xA0;0x55;0xB0;0x03;0x01;0x88",
    								"0xAA;0xA0;0x55;0xB2;0x00;0x01;0x01", "0xAA;0xA0;0x55;0xB0;0x00;0x01;0x01"}, 6},
    {"BACKWARD", (const char * const []) {"0xAA;0xA0;0x55;0xB2;0x02;0x01;0x77", "0xAA;0xA0;0x55;0xB0;0x02;0x01;0x77",
    							    "0xAA;0xA0;0x55;0xB2;0x03;0x01;0x88", "0xAA;0xA0;0x55;0xB0;0x03;0x01;0x88",
    							    "0xAA;0xA0;0x55;0xB2;0x00;0x01;0x02", "0xAA;0xA0;0x55;0xB0;0x00;0x01;0x02"}, 6},
    {"STOP", (const char * const []) {"0xAA;0xA0;0x55;0xB2;0x02;0x01;0x77", "0xAA;0xA0;0x55;0xB0;0x02;0x01;0x77",
    								"0xAA;0xA0;0x55;0xB2;0x03;0x01;0x88", "0xAA;0xA0;0x55;0xB0;0x03;0x01;0x88",
    								"0xAA;0xA0;0x55;0xB2;0x00;0x01;0x00", "0xAA;0xA0;0x55;0xB0;0x00;0x01;0x00"}, 6},
    {"LEFT", (const char * const []) {"0xAA;0xA0;0x55;0xB2;0x02;0x01;0x77", "0xAA;0xA0;0x55;0xB0;0x02;0x01;0x77",
        							"0xAA;0xA0;0x55;0xB2;0x03;0x01;0x88", "0xAA;0xA0;0x55;0xB0;0x03;0x01;0x88",
        							"0xAA;0xA0;0x55;0xB2;0x00;0x01;0x01", "0xAA;0xA0;0x55;0xB0;0x00;0x01;0x02"}, 6},
    {"RIGHT", (const char * const []) {"0xAA;0xA0;0x55;0xB2;0x02;0x01;0x77", "0xAA;0xA0;0x55;0xB0;0x02;0x01;0x77",
          							"0xAA;0xA0;0x55;0xB2;0x03;0x01;0x88", "0xAA;0xA0;0x55;0xB0;0x03;0x01;0x88",
           							"0xAA;0xA0;0x55;0xB2;0x00;0x01;0x02", "0xAA;0xA0;0x55;0xB0;0x00;0x01;0x01"}, 6}
};

#endif /* ACTIONS_H_ */
